/**
 *  商家回复组件 - leo
 */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
  StyleSheet, Text, View, Image
} from 'react-native';

export default class BusinessReplyCard extends Component {
  static propTypes = {
    reply: PropTypes.string.isRequired
  };

  render() {
    const { reply } = this.props;
    return (
      <View style={styles.container}>
        <View style={styles.iconwarp}>
          <Image resizeMode="contain" source={require('../../img/reply.png')} style={styles.icon} />
        </View>
        <View style={styles.titleRow}>
          <Text style={styles.replycon}><Text style={styles.replytitle}>商家回应：</Text>{reply}</Text>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flexDirection: 'row'
  },
  iconwarp: {
    width: 24,
    paddingTop: 6,
    paddingLeft: 5
  },
  icon: {
    width: 14,
    height: 14,
  },
  titleRow: {
    flex: 1
  },
  replytitle: {
    color: '#53748b',
    lineHeight: 24
  },
  replycon: {
    lineHeight: 24
  }
});
